def getMenuOption(debug = False):
    if debug:
        print "getMenuOption Function"
    validInput = False
    while not validInput:
        option = raw_input("> ")
        if option == "1":
            validInput = True
        elif option == "2":
            validInput = True #off until written
        elif option == "3":
            validInput = False #off until written
        elif (option.lower() == "exit" or
              option.lower() == "e" or
              option.lower() == "x" or
              option.lower() == "quit" or
              option.lower() == "q"):
                  validInput = True
                  option = "exit"
        else:
            print "Please type one of the available options"
    return option
        
def getWord(prompt, debug = False):
    if debug:
        print "getWord Function", prompt
    validInput = False
    while not validInput:
        option = raw_input(prompt)  
        validInput = True
        if option == "":
            print "Please type a word"
            validInput = False
        elif isSwear(option, debug):
            print "You're a monster"
            validInput = False
    return option

def getNumber(prompt, debug = False):
    if debug:
        print "getWord Function", prompt
    validInput = False
    numbers = "0123456789."
    while not validInput:
        option = raw_input(prompt)  
        validInput = True
        for character in option:
            if not(character in numbers):
                validInput = False
        if not validInput:
            print "Type only digits!"
    return option
        

        
def isSwear(word, debug = False):
    if debug:
        print "isSwear Function", word
    swears = ["poop",
              "dodo head",
              "pee",
              "shit",
              "bloody",
              "wanker",
              "hell",
              "fuck",
              "nigger",
              "nigga",
              "cunt",
              "dick",
              "penis",
              "vagina",
              "angry penguin",
              "boston steamer",
              "alabama slamma",
              "fag",
              "faggot",
              "damn",
              "pussy",
              "asshole",
              "bitch",]
    if word.lower() in swears:
        return True
    else:
        return False
        
        
def isOcean(word, debug = False):
    if debug:
        print "isOcean Function", word
    oceans = ["pacific",
              "atlantic",
              "artic",
              "indian",]
    if word.lower() in oceans:
        return True
    else:
        return False        
        
def getOcean(prompt, debug = False):
    if debug:
        print "getWord Function", prompt
    validInput = False
    while not validInput:
        option = raw_input(prompt)  
        if isOcean(option, debug):
            validInput = True
        else:
			print "Please enter an ocean"
			validInput = False
    return option       
        
   
        
        
        
        
    
